#define SEQ_TIME 0.0

#include <stdio.h>
#include <stdlib.h>

#define ndim 3
#define nparts 8192
#define nsteps 10

#define NDIM ndim
#define NPARTS nparts
#define NSTEPS nsteps

typedef double vnd_t[ndim] ;

/******************
 * main program
 ******************/

int main (int argc, char **argv) {
  /* simulation parameters */
  double mass = 1.0;
  double dt = 1.0e-4;
  vnd_t force[nparts];
  vnd_t accel[nparts];
    
  int i;
  vnd_t rij;
  double pot = 0.0;
  #pragma omp target device(mpi)
  #pragma omp parallel for default(shared) private(i) reduction(+ : pot, force) firstprivate(rij)
  #pragma llc result (&force[i], 1)
  for (i = 0; i < nparts; i++) {
	pot = pot + 0.5;
	force[i][i] = force[i][i] - rij[i];
  }
  
    int j;
    double rmass = 1.0/mass;
    #pragma omp target device(mpi)
    #pragma omp parallel for default(shared) private(j) firstprivate(rmass, dt)
    #pragma llc result (&accel[j], 1)
    for (j = 0; j < nparts; j++) {
        accel[0][0] = rmass + dt;
    }


  return (0);
}
